Repository navigation
test(lsp): pin ripr/listActionableItems handler branches and exact capability contract - #3031
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
Next review available in: 32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…pability contract Address post-merge review findings on d3fafbc (#3012): - Simplify the handler's snapshot extraction with and_then (gemini's 'will not compile' claim is refuted: guard.clone() resolved through Deref to Option::clone, so main compiled; the match already flattened. The and_then form is still clearer and matches module style). - Add direct unit tests for all four handler branches: no snapshot, analysis in flight (delivery_selection None), Unavailable outcome, and the Applied happy path, asserting JSON envelope fields including snapshot_id propagation and the read-only must_not_change invariants. - Strengthen capability_advertises_only_implemented_handlers to direct vector equality on supported_requests/supported_profiles and lock the remaining v0_1_implemented fail-closed fields (snapshot_handles, cancellation, continuations, work_done_progress, diagnostic_modes, claim_boundary). - Document that snapshot_id is the interim refresh-generation identity for this first slice, not #1602's immutable snapshot-handle contract, at both the emission site and the capability constructor. Refs #1603
0848a9b to
d566c05
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…ipt (#3032) (#3133) PR #3031 (6fc4d5e) landed the #3032 functional hardening: direct tests for all four ripr_list_actionable_items branches, exact fail-closed capability equality, and the interim snapshot_id boundary docs. The issue's residual acceptance row is a retained removal/mutation receipt proving those tests discriminate. This change retains that receipt (docs/handoffs/ 2026-08-11-list-actionable-items-mutation-receipt.md), run over origin/main c8e3e18: - Mutation A (no-snapshot branch kind flipped): exactly list_actionable_items_without_snapshot_fails_closed FAILED, 3 others ok. - Mutation B (must_not_change removed from the success envelope): exactly list_actionable_items_applied_returns_bounded_envelope FAILED, 3 others ok. - Mutation C (supported_requests emptied in v0_1_implemented): exactly capability_advertises_only_implemented_handlers FAILED, 10 others ok. Each mutation kept the crate compilable and was reverted before the next ran; git status is clean after all reversions. The receipt also records the refutation of the #3012 post-merge review's MutexGuard::clone claim: the exact landed extraction shape compiles and runs under the pinned rustc 1.95.0 with -D warnings (clone resolves through Deref to Option::<Arc<_>>::clone; verified by Arc::ptr_eq), and d3fafbc is an ancestor of a main that builds. Not a defect; #3031's and_then form is a clarity improvement only. Refs #3032 Co-authored-by: Test <test@example.com>
Context
PR #3012 merged in seconds without pre-merge review; substantive findings arrived post-merge and remained unresolved. This corrective candidate addresses every thread on the landed handler with code and evidence. Release disposition: post-
0.11development work (safe_defer_post_0_11,absent_by_candidate_only_exclusion) unless release authority promotes it.Per-finding disposition
guard.clone()will not compile / type error" — REFUTED with evidence, style point taken. The merged code compiled because method resolution auto-derefsMutexGuard<Option<Arc<AnalysisSnapshot>>>toOptionand callsOption::clone; thematchalready flattened, so noOption<Option<…>>ever existed.cargo check -p ripron the merged base is clean. The "convoluted" critique had merit: the snapshot fetch now useslock().ok().and_then(|guard| (*guard).clone()), behavior identical, with a comment recording the fail-closed semantics.list_actionable_items_testsharness (LspService + current-thread runtime, mirroring existing LSP handler tests) covers all four branches:no_snapshot,analysis_in_flight(no delivery selection),Unavailabledelivery outcome, and theAppliedhappy path — the last built through the realDiagnosticDeliverySelection::evaluate, no fabricated budget result. Assertions covererror.kind/recovery_route, absence of snapshot identity on error paths,snapshot_idpropagation, bounded counts,budget_identity,complete_evidence_identity,continuation_or_inspect_route,allowed_edit_surface == "read_only", and exactmust_not_change.capability_advertises_only_implemented_handlersnow asserts direct vector equalitysupported_requests == vec![ListActionableItems]andsupported_profiles == vec![Actionable], and locks the rest of thev0_1_implementedcontract:implementation_state, interimsnapshot_handles,cancellation, fail-closedcontinuations/work_done_progress, push-onlydiagnostic_modes, exactclaim_boundary, read-onlysource_edit_capability.snapshot_idemission and atRiprAgentCapability::v0_1_implementedstate the generation identity is an interim compatibility state, NOT lifecycle(lsp): make standard diagnostics, result IDs, progress, cancellation, and refresh the currentness authority #1602's immutable snapshot-handle contract, and must not be represented as such. Deliberately no wire-contract change (snapshot_handles: trueis retained as the advertised interim state per the review's own "lock the current contract" instruction); re-scoping that flag is a lifecycle(lsp): make standard diagnostics, result IDs, progress, cancellation, and refresh the currentness authority #1602-slice decision.Verification (independently re-run)
cargo test -p ripr --lib lsp— 637 passed, 0 failed (4 new + strengthened capability test included).cargo fmt --check— clean.Follow-ups observed, not in scope
serde_json::json!lacking the typed envelope fields (protocol_version, freshness, run_status, limitations, non_claims); error payloads omitallowed_edit_surface/must_not_change. Candidate projection(lsp): deliver bounded RIPR evidence through standard diagnostics, hover, code actions, and commands #1603-slice follow-up.Refs #1603